package com.mecuros.config;

import com.mecuros.user.rule.NacosRandomWithWeightRule;
import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Classname RibbonConfig
 * @Description TODO
 * @Date 2022/1/25 9:02 下午
 * @Created by yujianbo
 */
//@Configuration
public class RibbonConfig {

    /**
     * 全局配置
     * 指定负载均衡策略
     * @return
     */
    @Bean
    public IRule getIRule(){
        return new NacosRandomWithWeightRule();
    }
}
